<%@ page import="zhangcy.day0109.qingyoutravel.dao.TourRouteDao" %>
<%@ page import="zhangcy.day0109.qingyoutravel.dao.impl.TourRouteDaoImpl" %>
<%@ page import="zhangcy.day0109.qingyoutravel.po.TourRoute" %><%--
  Created by IntelliJ IDEA.
  User: 小香菜
  Date: 2023/1/9
  Time: 20:55
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>保存旅游路线信息</title>
    <%
        String trName = request.getParameter("trName");
        String trPrice = request.getParameter("trPrice");
        String trUser = request.getParameter("trUser");
        String trPhone = request.getParameter("trPhone");
        TourRouteDao tourRouteDao = new TourRouteDaoImpl();
        TourRoute tourRoute = new TourRoute();
        tourRoute.setTrName(trName);
        tourRoute.setTrPrice(Double.valueOf(trPrice));
        tourRoute.setTrUser(trUser);
        tourRoute.setTrPhone(trPhone);
        int addRes = tourRouteDao.insert(tourRoute);
        if (addRes > 0) {
            request.getRequestDispatcher("service-platform.jsp").forward(request, response);
        }else {
            out.println("添加失败!");
        }
    %>
</head>
<body>

</body>
</html>
